package org.aldar.bquest.util;

import org.aldar.bquest.screens.MainBoardScreen;
import org.andengine.entity.Entity;
import org.andengine.entity.primitive.Rectangle;

/**
 * Created with IntelliJ IDEA.
 * User: Daria
 * Date: 5/31/13
 * Time: 7:01 PM
 * To change this template use File | Settings | File Templates.
 */
public class ScreenUtils {

    private static void drawRectBold(float[] lastOrthoXY) {
        drawRectBold(lastOrthoXY[0], lastOrthoXY[1]);
    }

    private static void drawRect(float[] curOrthoXY) {
        drawRect(curOrthoXY[0], curOrthoXY[1]);
    }


    public static void drawRect(float pX, float pY) {
        MainBoardScreen.getScm().getTestLayer().attachChild(new Rectangle(pX - 1, pY - 1, 3, 3, MainBoardScreen.getScm().getVertexBufferObjectManager()));
    }

    public static void drawRectBold(float pX, float pY) {
        MainBoardScreen.getScm().getTestLayer().attachChild(new Rectangle(pX - 2, pY - 2, 5, 5, MainBoardScreen.getScm().getVertexBufferObjectManager()));
    }

    public static void resetLayer() {
        MainBoardScreen.getScm().getTestLayer().detachChildren();
    }


    public static void attachEntity(Entity entity) {
        MainBoardScreen.getScm().getTestLayer().attachChild(entity);
    }
}
